package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmzInventoryCheckDetailMapper;
import com.ruoyi.system.domain.HmzInventoryCheckDetail;
import com.ruoyi.system.service.IHmzInventoryCheckDetailService;

/**
 * 用于存储盘点单明细信息的Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-10
 */
@Service
public class HmzInventoryCheckDetailServiceImpl implements IHmzInventoryCheckDetailService 
{
    @Autowired
    private HmzInventoryCheckDetailMapper hmzInventoryCheckDetailMapper;

    /**
     * 查询用于存储盘点单明细信息的
     * 
     * @param id 用于存储盘点单明细信息的主键
     * @return 用于存储盘点单明细信息的
     */
    @Override
    public HmzInventoryCheckDetail selectHmzInventoryCheckDetailById(Long id)
    {
        return hmzInventoryCheckDetailMapper.selectHmzInventoryCheckDetailById(id);
    }

    /**
     * 查询用于存储盘点单明细信息的列表
     * 
     * @param hmzInventoryCheckDetail 用于存储盘点单明细信息的
     * @return 用于存储盘点单明细信息的
     */
    @Override
    public List<HmzInventoryCheckDetail> selectHmzInventoryCheckDetailList(HmzInventoryCheckDetail hmzInventoryCheckDetail)
    {
        return hmzInventoryCheckDetailMapper.selectHmzInventoryCheckDetailList(hmzInventoryCheckDetail);
    }

    /**
     * 新增用于存储盘点单明细信息的
     * 
     * @param hmzInventoryCheckDetail 用于存储盘点单明细信息的
     * @return 结果
     */
    @Override
    public int insertHmzInventoryCheckDetail(HmzInventoryCheckDetail hmzInventoryCheckDetail)
    {
        hmzInventoryCheckDetail.setCreateTime(DateUtils.getNowDate());
        return hmzInventoryCheckDetailMapper.insertHmzInventoryCheckDetail(hmzInventoryCheckDetail);
    }

    /**
     * 修改用于存储盘点单明细信息的
     * 
     * @param hmzInventoryCheckDetail 用于存储盘点单明细信息的
     * @return 结果
     */
    @Override
    public int updateHmzInventoryCheckDetail(HmzInventoryCheckDetail hmzInventoryCheckDetail)
    {
        hmzInventoryCheckDetail.setUpdateTime(DateUtils.getNowDate());
        return hmzInventoryCheckDetailMapper.updateHmzInventoryCheckDetail(hmzInventoryCheckDetail);
    }

    /**
     * 批量删除用于存储盘点单明细信息的
     * 
     * @param ids 需要删除的用于存储盘点单明细信息的主键
     * @return 结果
     */
    @Override
    public int deleteHmzInventoryCheckDetailByIds(Long[] ids)
    {
        return hmzInventoryCheckDetailMapper.deleteHmzInventoryCheckDetailByIds(ids);
    }

    /**
     * 删除用于存储盘点单明细信息的信息
     * 
     * @param id 用于存储盘点单明细信息的主键
     * @return 结果
     */
    @Override
    public int deleteHmzInventoryCheckDetailById(Long id)
    {
        return hmzInventoryCheckDetailMapper.deleteHmzInventoryCheckDetailById(id);
    }
}
